package com.scms.secondclass.domain;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.DecimalMax;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.scms.common.annotation.Excel;
import com.scms.common.core.domain.BaseEntity;

/**
 * 活动分类对象 activity_category
 * 
 * @author scms
 */
public class ActivityCategory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 分类ID */
    private Long categoryId;

    /** 分类名称 */
    @Excel(name = "分类名称")
    @NotBlank(message = "分类名称不能为空")
    @Size(min = 0, max = 50, message = "分类名称长度不能超过50个字符")
    private String categoryName;

    /** 父分类ID */
    @Excel(name = "父分类ID")
    private Long parentId;

    /** 显示顺序 */
    @Excel(name = "显示顺序")
    @NotNull(message = "显示顺序不能为空")
    private Long orderNum;

    /** 学分系数 */
    @Excel(name = "学分系数")
    @NotNull(message = "学分系数不能为空")
    @DecimalMin(value = "0.01", message = "学分系数不能小于0.01")
    @DecimalMax(value = "10.00", message = "学分系数不能大于10.00")
    private BigDecimal creditRate;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    /** 子分类 */
    private List<ActivityCategory> children = new ArrayList<ActivityCategory>();

    public Long getCategoryId()
    {
        return categoryId;
    }

    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public String getCategoryName()
    {
        return categoryName;
    }

    public void setCategoryName(String categoryName)
    {
        this.categoryName = categoryName;
    }

    public Long getParentId()
    {
        return parentId;
    }

    public void setParentId(Long parentId)
    {
        this.parentId = parentId;
    }

    public Long getOrderNum()
    {
        return orderNum;
    }

    public void setOrderNum(Long orderNum)
    {
        this.orderNum = orderNum;
    }

    public BigDecimal getCreditRate()
    {
        return creditRate;
    }

    public void setCreditRate(BigDecimal creditRate)
    {
        this.creditRate = creditRate;
    }

    public String getStatus()
    {
        return status;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public List<ActivityCategory> getChildren()
    {
        return children;
    }

    public void setChildren(List<ActivityCategory> children)
    {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("categoryId", getCategoryId())
            .append("categoryName", getCategoryName())
            .append("parentId", getParentId())
            .append("orderNum", getOrderNum())
            .append("creditRate", getCreditRate())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
} 